package com.code.day19;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class Demo04EntrySet {
    public static void main(String[] args) {
        HashMap<String,String> map1 = new HashMap<>();
        map1.put("郭靖","黄蓉");
        map1.put("杨过","小龙女");
        map1.put("张无忌","赵敏");

        Set<Map.Entry<String, String>> set = map1.entrySet();
        for (Map.Entry<String, String> stringStringEntry : set) {
            String key = stringStringEntry.getKey();
            String value = stringStringEntry.getValue();
            System.out.println(key+"--->"+value);
        }
    }
}
